package com.maoyanjava.controller;

import com.maoyanjava.pojo.Userinfo;
import com.maoyanjava.service.UserinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@RestController
public class UserinfoController {
    @Autowired
    private UserinfoService us;
    @PostMapping("/userinfo")
    public int upUserinfo(HttpServletRequest request, HttpServletResponse response,@RequestBody Userinfo userinfo ){
        return us.upUserinfo(userinfo);
    }
}
